package edu.zhku.ttms.domain;

/**
 * @author Feng
 * @since 2021/4/19 12:28
 */

public class User {

    /**
     * 用户主键
     */
    private Long userId;

    /**
     * 用户名（管理员为"admin"，交警为交警代号，驾驶员为驾驶证号）
     */
    private String loginName;

    /**
     * 密码
     */
    private String password;

    /**
     * 角色（1：管理员 2：交警 3：驾驶员）
     */
    private Integer roleId;

    /**
     * 逻辑删除（0：默认，未删除 1：已删除）
     */
    private Integer isDeleted;

    public User() {}

    public User(Long userId, String loginName, String password, Integer roleId, Integer isDeleted) {
        this.userId = userId;
        this.loginName = loginName;
        this.password = password;
        this.roleId = roleId;
        this.isDeleted = isDeleted;
    }

    public User(String loginName, String password, Integer roleId) {
        this.loginName = loginName;
        this.password = password;
        this.roleId = roleId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", loginName='" + loginName + '\'' +
                ", password='" + password + '\'' +
                ", roleId=" + roleId +
                ", isDeleted=" + isDeleted +
                '}';
    }
}
